"""
@Time ： 2022/7/7 21:44
@Auth ： ChenZhangKun
"""
import pymysql

def demo():
    # 获取链接
    conn = pymysql.connect(host="localhost", port=3306, user="root", password="1234", database='bos32')

    curser=conn.cursor()

    sql='''
    insert into user(name,password) values ('kd','1212')
    
    '''

    curser.execute(sql)

    conn.commit()

    conn.close()

    curser.close()

if __name__ == '__main__':
    demo()